package com.hk.controller;

import com.hk.domain.entity.SaveOrder;
import com.hk.domain.entity.UpdateOrder;
import com.hk.service.order.OrderService;
import com.hk.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: dpb
 * @Description 使用切面对订单detail日志收集
 * @date: 2022/12/6 23:30
 * @Version 1.0
 */
@RestController
@RequestMapping("/order")
public class OrderAspectController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/process")
    public R  processOrder() {
        orderService.saveOrder(SaveOrder.builder().id(1L).build());
        orderService.updateOrder(UpdateOrder.builder().orderId(2L).build());
        return R.ok();
    }

}
